package com.idealighter.game.recharge.handler;

import com.google.inject.Inject;

import com.idealighter.game.core.annotation.ReqMsgHandler;
import com.idealighter.game.message.ModuleMsgIdConstant;
import com.idealighter.game.message.core.ReqMessage;
import com.idealighter.game.message.core.ResMessage;
import com.idealighter.game.player.struct.Player;
import com.idealighter.game.recharge.manager.RechargeMgr;
import com.idealighter.game.recharge.message.ReqAppleAppPayCheckMsg;
import com.idealighter.game.server.handler.ReqMessageHandler;

@ReqMsgHandler(ModuleMsgIdConstant.Recharge.APPLE_APP_PAY_CHECK)
public class ReqAppleAppPayCheckHandler implements ReqMessageHandler {

  @Inject
  private RechargeMgr rechargeMgr;

  @Override
  public ResMessage action(Player player, ReqMessage msg) {
    ReqAppleAppPayCheckMsg payMsg = (ReqAppleAppPayCheckMsg) msg;

    return rechargeMgr.appleAppPayCheck(player, payMsg.getOrderNo(), payMsg.getReceipt());
  }
}
